<template>
	<view class="box" :style="{'padding-top':systemHeight+28.5+'px'}">
		<view class="head">
			<image class="back" src="/static/img/back.png" @click="back"></image>
			<view class="title">Add emergency contact person</view>
			<view class="right"></view>
		</view>
		<view class="small_title">Contact Name</view>
		<input class="inpu" placeholder="Enter contact name" v-model="Name"/>
		<view class="small_title">Mobile Number</view>
		<view class="inpus">
			<view class="inpu_box">
				<input class="small_inpu" placeholder="prefix" v-model="areaNums" type="number"/>
				<image class="img" src="/static/img/pay.png"></image>
			</view>
			<input class="inpu" placeholder="Enter your phone number" v-model="number" type="number"/>
		</view>

		<view class="save" :class="{'click_save':Name&&areaNums&&number}">Save</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				systemHeight: null,
				Name:'',
				//区号
				areaNums:'123',
				number:""
				
			}
		},
		created() {
			this.systemHeight = uni.getSystemInfoSync().statusBarHeight
		},
		methods: {
			back() {
				uni.navigateBack()
			}
		}
	}
</script>

<style>
	.box {
		position: fixed;
		width: 100%;
		height: 100vh;
	}

	.head {
		margin: 0rpx auto 57rpx;
		width: 92%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 57rpx;
	}

	.back {
		width: 20rpx;
		height: 36rpx;
	}

	.title {
		font-family: Mont;
		font-weight: bold;
		font-size: 32rpx;
	}

	.right {
		width: 20rpx;
	}

	.small_title {
		margin: 0rpx auto 27rpx;
		width: 92%;
		font-family: Mont;
		font-weight: 600;
		font-size: 28rpx;
	}

	.inpu {
		margin: 0rpx auto 57rpx;
		width: 92%;
		padding-left: 32rpx;
		box-sizing: border-box;
		width: 92%;
		height: 92rpx;
		background: #F4F4F4;
		border-radius: 30rpx;
	}

	.inpus {
		position: relative;
		margin: 0rpx auto;
		width: 92%;
		display: flex;
	}

	.inpu_box {
		position: relative;
		margin-right: 33rpx;
		height: 92rpx;
	}

	.small_inpu {
		width: 188rpx;
		height: 92rpx;
		background: #F4F4F4;
		border-radius: 30rpx;
		padding-left: 84rpx;
		box-sizing: border-box;
	}

	.img {
		position: absolute;
		left: 25rpx;
		top: 50%;
		transform: translate(0, -50%);
		width: 48rpx;
		height: 47rpx;
	}

	.save {
		position: absolute;
		bottom: 190rpx;
		left: 50%;
		transform: translate(-50%, 0);
		width: 690rpx;
		height: 92rpx;
		background: #DFDFDF;
		border-radius: 46rpx;
		font-family: Mont;
		font-weight: bold;
		font-size: 30rpx;
		color: #888888;
		line-height: 92rpx;
		text-align: center;
	}
	.click_save{
		background: #34BA78;
		color: white;
	}
</style>